using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Sispe.Entities;

namespace Sispe.Repository.Mapping
{
    public class BANCOMap : EntityTypeConfiguration<BANCO>
    {
        public BANCOMap()
        {
            // Primary Key
            this.HasKey(t => t.IdBanco);

            // Properties
            this.Property(t => t.Descripcion)
                .IsRequired()
                .HasMaxLength(350);

            // Table & Column Mappings
            this.ToTable("BANCO");
            this.Property(t => t.IdBanco).HasColumnName("IdBanco");
            this.Property(t => t.Descripcion).HasColumnName("Descripcion");
        }
    }
}
